package han;
import java.util.Random;
public class Horse {
    Random r=new Random();
    int r4= r.nextInt(3);
    private String id="001";
    private String name="Tom";
    private String weight="180kg";
    private String height="180cm";
    private String color="white and black";
    private String heart;
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getHeart() {
        return heart;
    }

    public void setHeart() {
        switch(r4)
        {
            case 0:
            {
                this.heart="开心";
            }
                break;
            case 1:
            {
                this.heart="沮丧";
            }
                break;
            case 2:
            {
                this.heart="生气";
            }
                break;
        }
    }


    public void show()
    {
        setHeart();
        System.out.println("id:"+id);
        System.out.println("名称:"+name);
        System.out.println("颜色:"+color);
        System.out.println("体重:"+weight);
        System.out.println("身高:"+height);
        System.out.println("心情:"+heart);
    }
}

